{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "Attaching package: 'dplyr'\n",
      "\n",
      "The following objects are masked from 'package:data.table':\n",
      "\n",
      "    between, first, last\n",
      "\n",
      "The following objects are masked from 'package:plyr':\n",
      "\n",
      "    arrange, count, desc, failwith, id, mutate, rename, summarise,\n",
      "    summarize\n",
      "\n",
      "The following objects are masked from 'package:stats':\n",
      "\n",
      "    filter, lag\n",
      "\n",
      "The following objects are masked from 'package:base':\n",
      "\n",
      "    intersect, setdiff, setequal, union\n",
      "\n"
     ]
    }
   ],
   "source": [
    "library(plyr)\n",
    "library(dplyr)\n",
    "library(forecast)\n",
    "library(data.table)\n",
    "library(tseries)\n",
    "options(warn=-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "user_balance=read.csv(\"../../Purchase Redemption Data/user_balance_table.csv\")\n",
    "user_balance$report_date=as.Date(as.character(user_balance$report_date),format=\"%Y%m%d\")\n",
    "\n",
    "temp=order(user_balance$report_date)\n",
    "user_balance=user_balance[temp,]\n",
    "\n",
    "data=ddply(user_balance,.(report_date),function(D){ colwise(sum)(D[,c(-1,-2)])})\n",
    "\n",
    "train_data = data[274:396,]\n",
    "test_data = data[397:427,]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_score<- function(purchase_pred,redeem_pred,purchase_true,redeem_true,h=0.3){\n",
    "  out = data.frame(purchase_pred ,redeem_pred,purchase_true,redeem_true )\n",
    "  \n",
    "  out$purchase_mape = abs(out$purchase_pred-out$purchase_true)/\n",
    "    out$purchase_true\n",
    "  out$redeem_mape = abs(out$redeem_pred-out$redeem_true)/\n",
    "    out$redeem_true\n",
    "  \n",
    "  score = sum(exp(-out$purchase_mape/h)*10)* 0.45 + \n",
    "    sum(exp(-out$redeem_mape/h)*10)* 0.55 \n",
    "  return(score)\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "172.722232296235"
      ],
      "text/latex": [
       "172.722232296235"
      ],
      "text/markdown": [
       "172.722232296235"
      ],
      "text/plain": [
       "[1] 172.7222"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#####purchase\n",
    "purchase_ts=ts(train_data$total_purchase_amt,\n",
    "               frequency=7,start=c(1,1))##生成时间序列\n",
    "purchase_stl_res = stl(purchase_ts,s.window=\"periodic\",robust=TRUE)##stl分解\n",
    "purchase_pred_test = forecast(purchase_stl_res,h = 31)$mean##得到测试集预测结果\n",
    "\n",
    "\n",
    "\n",
    "#####redeem\n",
    "redeem_ts = ts(train_data$total_redeem_amt,\n",
    "               frequency=7,start=c(1,1))\n",
    "redeem_stl_res = stl(redeem_ts,s.window=\"periodic\",robust=TRUE)\n",
    "redeem_pred_test = forecast(redeem_stl_res,h = 31)$mean\n",
    "\n",
    "\n",
    "get_score(purchase_pred_test,redeem_pred_test,test_data$total_purchase_amt,\n",
    "          test_data$total_redeem_amt)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "purchase_del_ts=ts(purchase_ts-purchase_stl_res$time.series[,1],\n",
    "                   frequency=7,start=c(1,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAMFBMVEUAAABNTU1oaGh8fHyM\njIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////QFLu4AAAACXBIWXMAABJ0AAAS\ndAHeZh94AAAgAElEQVR4nO2diZajIBAAMXFMJpPo///truY0InI0CFr13m4u6CZIjWdEdQAQ\njFq7AQBbAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEA\nBEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAA\nRAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAk\nAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQ\nAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQCUAARAIQAJEABEAkAAEQ\nCU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QAJEABEAkAAEQCUAARCoB9cEGZgDfIiyUEkCk7GGhFAMC5QwLpxgQKWdY\nOMXwFKl//P/vpKpT1zVK3acyPx9UtYHJwYsFkYphLNKp31+6HPv/e5PqYf/puGoDdw0iFcNY\npGPbnR//V1136Z+1R3VZt4k7BpGKYSzS3/Ds9nhdq/b/s1bVK7Zv3yBSMXztI3Wf/78PjsM6\n0PPFgEg5Q88Xg1mk9doFPSyAYjCJVHOYYWUQqRhMIv2q6tp1Zw42rAYiFYNJpG44oaSq22qt\n2zuIVAxGkforG9QPHq0GIgEIgEgAAiASgACIBCAAIgEIgEgAAiASgACIBCAAIgEIgEgAAiAS\ngACIBCAAIgEIgEgAAiASgACIBCAAIgEIgEgAAiASgACIBCAAIgEIgEgAAiASgACIBCAAIgEI\ngEgAAiASgACIBCAAIgEIgEgAAiASgAD/AJq115u4MiiuAAAAAElFTkSuQmCC",
      "text/plain": [
       "plot without title"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot(purchase_del_ts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAYl0lEQVR4nO3d2ULq2AJF0X1Dqwj4/197ISACepCClZYxHhSJspOQeSAN\nVeUTeFrpegZgDIQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQI\nCQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChPSQ1bwq\nZbJY3/qdUhpfucEhfnuo3x9+nhpyVIT0iEU5Wt74pXGG9FHZZH5jrTzgrZx8/Pu3xhlSC0s1\nSNbKAyalLL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Ofk+ennYACbNHs68Hm9b1Xc0eSLia8NuZfmux2t4+ebl+1q3Npbv\nx3gtPH+PaTukbX2x8GHocnVHa+NNGj14ehlSw8v363jNLV/5EVKzy/f7eM0+f4/p3U4bDJGQ\nIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQ\nEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAGpH//L2++eGoGREj95akZ\nECH1l6dmQITUX56aATkLaTUrp/+Z+KIqC5F1zOofkO9YlqVWlzTd35oLqVtW/4B8x1LK++fn\ne/3zqlTrz3UlpG5Z/QNyHUv986ysPvc5eSY7ZfUPyHksm9VyWv98vFNI3bL6B+QslulhJ+lT\nSD1h9Q/IdyzzMnlbbYTUH1b/gJwfbNh92dhH6g+rf0DOQ/r4XE8dtesPq39ASvnaM1ocb318\nnnaXPJOdsvoH5Duk3U5SmX6symx/96La3RZSt6z+kSjTrufgtQlp6OqLHLazsuh6Rl6bkIbu\neNld1fV8vDghDd7btJSJ16OOCQkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQ\nIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoKA/wOtqhXwJS3hGgAA\nAABJRU5ErkJggg==",
      "text/plain": [
       "Plot with title \"Series  purchase_del_ts\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "acf(purchase_del_ts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\tAugmented Dickey-Fuller Test\n",
       "\n",
       "data:  purchase_del_ts\n",
       "Dickey-Fuller = -4.3948, Lag order = 4, p-value = 0.01\n",
       "alternative hypothesis: stationary\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "adf.test(purchase_del_ts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.007097898\n",
      "[1] 0.04290397\n",
      "[1] 0.005825161\n",
      "[1] 0.03343909\n"
     ]
    }
   ],
   "source": [
    "for(i in 1:2){print(Box.test(purchase_del_ts,type = \"Box-Pierce\",\n",
    "                             lag = i*6)$p.value)}\n",
    "for(i in 1:2){print(Box.test(purchase_del_ts,type = \"Ljung-Box\",\n",
    "                             lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAalUlEQVR4nO3d6ULqyBqG0ZwAoiLg/V/tkUEFddME3lQqZK0f7YDyVUGe\nRgbdzTtwt2boBcAjEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBI\nECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQ0k1W\nT23TzJbrS1/TNL1fuMERf53V32f/lBr5UIR0i2Vz9Hzhix4zpLfWIfMXl8oNXpovb//+qscM\nqcCuRsmlcoNZ0yy37++bedMsBl2IkKrhUrnB58G0/Xpn2TbtcvN54mbWLE++6uTE7fNHfM3i\n9R9n+vKR6NPX2Zy+/TrXj7P7+KL56uvEt/nX97y/LprdXbfN71Gnizi3+bi7N3v5c7W/ozne\nDl/eySQJ6QYfR/Li9Ge6TXvyc97uUP440r8Ow9MT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78b6QhuXi\nfxDNfOgVTJuQxm7/IoftolkOvZBpE9LYHV921w69jokT0ui9zJtm5vZoYEKCACFBgJAgQEgQ\nICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJ\nAoQEAUKCACFBgJAg4P8RoB9C9MSFjQAAAABJRU5ErkJggg==",
      "text/plain": [
       "Plot with title \"Series  purchase_del_ts\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pacf(purchase_del_ts)#p，横轴从1开始"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAYl0lEQVR4nO3d2ULq2AJF0X1Dqwj4/197ISACepCClZYxHhSJspOQeSAN\nVeUTeFrpegZgDIQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQI\nCQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChPSQ1bwq\nZbJY3/qdUhpfucEhfnuo3x9+nhpyVIT0iEU5Wt74pXGG9FHZZH5jrTzgrZx8/Pu3xhlSC0s1\nSNbKAyalLLafn5tpKbNOZ0RIvWGtPOBrY9qebiyqUi02XxM3k7I4+62zidvlLr4ye//Hg77t\nEp2fHub8++lRdw+3+6Xp6jTxY3r6m8/3Wdnvum1+DnU+E5c2u929yduvc/szmuPr8O0leUlC\nesBuS56dv6fbVGfv8/ab8m5LP22G5xO/bu8nX9tvlvW0anP88fPs++lRvx5icbx3cfY307M3\nnJdDXczhhY/jb/0yt7dCurUkL0lID6j3kar5+9c/8F8bVbX/4XDz/bQZ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oGREj95akZ\nECH1l6dmQITUX56aATkLaTUrp/+Z+KIqC5F1zOofkO9YlqVWlzTd35oLqVtW/4B8x1LK++fn\ne/3zqlTrz3UlpG5Z/QNyHUv986ysPvc5eSY7ZfUPyHksm9VyWv98vFNI3bL6B+QslulhJ+lT\nSD1h9Q/IdyzzMnlbbYTUH1b/gJwfbNh92dhH6g+rf0DOQ/r4XE8dtesPq39ASvnaM1ocb318\nnnaXPJOdsvoH5Duk3U5SmX6symx/96La3RZSt6z+kSjTrufgtQlp6OqLHLazsuh6Rl6bkIbu\neNld1fV8vDghDd7btJSJ16OOCQkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQ\nIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoKA/wOtqhXwJS3hGgAA\nAABJRU5ErkJggg==",
      "text/plain": [
       "Plot with title \"Series  purchase_del_ts\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "acf(purchase_del_ts)#q"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "purchase_del_fit = arima(purchase_del_ts/1000,order = c(1,0,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "Call:\n",
       "arima(x = purchase_del_ts/1000, order = c(1, 0, 1))\n",
       "\n",
       "Coefficients:\n",
       "         ar1      ma1   intercept\n",
       "      0.4187  -0.0593  265797.596\n",
       "s.e.  0.2409   0.2584    7658.852\n",
       "\n",
       "sigma^2 estimated as 2.784e+09:  log likelihood = -1512.04,  aic = 3032.09"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "purchase_del_fit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.9691384\n",
      "[1] 0.9876937\n",
      "[1] 0.9734135\n",
      "[1] 0.9914217\n"
     ]
    }
   ],
   "source": [
    "for(i in 1:2){print(Box.test(purchase_del_fit$residuals,type = \"Ljung-Box\",\n",
    "                             lag = i*6)$p.value)}\n",
    "for(i in 1:2){print(Box.test(purchase_del_fit$residuals,type = 'Box-Pierce',\n",
    "                             lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "purchase_pred_test = forecast(purchase_stl_res$time.series[,1],31)$mean+\n",
    "  predict(purchase_del_fit,n.ahead = 31)$pred*1000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "#####redeem\n",
    "redeem_del_ts=ts(redeem_ts-redeem_stl_res$time.series[,1],\n",
    "                   frequency=7,start=c(1,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAMFBMVEUAAABNTU1oaGh8fHyM\njIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////QFLu4AAAACXBIWXMAABJ0AAAS\ndAHeZh94AAAgAElEQVR4nO2diZaiMBQFg9rq2Db8/99Oi7ayJJCQl5Cl6pxxg5cbAtUoOKI6\nAPBG7d0BgBJAJAABEAlAAEQCEACRAARAJAABEAlAAEQCEACRAARAJAABEAlAAEQCEACRAARA\nJAABEAlAAEQCEACRAARAJAABEAlAAEQCEACRAARAJAABEAlAAEQCEACRAARAJAABEAlAAEQC\nEACRAARAJAABEAlAAEQCE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/aOf1/OTan8fteq0Y//qBpGyYfIZqRvefg6Owz4w8tmASCnDyGfDskj7\n9QsesAKyYUmkE4cZdgaRsmFJpH+quXfdlYMNu4FI2bAkUtefUFLNz269qx1EyoZFkR7fbFBf\neLQbiAQgACIBCIBIAAIgEoAAiAQgACIBCIBIAAIgEoAAiAQgACIBCIBIAAIgEoAAiAQgACIB\nCIBIAAIgEoAAiAQgACIBCIBIAAIgEoAAiAQgACIBCIBIAAIgEoAAiAQgACIBCIBIAAIgEoAA\niAQgACIBCIBIAAL8B05DSn01V92YAAAAAElFTkSuQmCC",
      "text/plain": [
       "plot without title"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot(redeem_del_ts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAYOElEQVR4nO3d50LqSACG4dlQFSn3f7ULWA4oosKXSeF5fig6kqHkXUjh\nbNkBdytd3wAYAyFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFC\nggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAId1rNW9K\nmSzW1/6mlODjHFzYpUVdXvw8NeVYCelOi/JmeeWPhh7SS2M9+YEH6D5P5cPL93819JCit3+c\nPED3mZSy2O52m2kps0pTCqmPPED3eV/Fth8XFk1pFpv3wc2kLE7+6mRwu9zHV2bPlxf6er2z\nK+w2+62xydPFhX2edvc0KZP9S+RTU6aXXimvLOprNG+vuNdv86MT0n32r0iz0zV105y8z9t/\n349PP1bO08H3y4fhzz6ud7a0l7e/v7CwL9NOjz9tFt+857y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sR8eSpodLcyF1\ny8M/IP9iKeV5t3s+/rwqzXq3boTULQ//gHyO5fjzrKx2h5w8k53y8A/IaSyb1XJ6/Pntl0Lq\nlod/QE5imb5uJO2E1BMe/gH5F8u8TJ5WGyH1h4d/QE53Nuy/bGwj9YeHf0BOQ3rZraf22vWH\nh39ASnnfMlq8XXrZfWwueSY75eEfkH8h7TeSyvRlVWaHXy+a/WUhdcvDPxJl2vUteGxCGrrj\nSQ7bWVl0fUMem5CG7u20u6br2/HghDR4T9NSJl6POiYkCBASBAgJAoQEAUKCACFBgJAgQEgQ\nICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJ\nAv4HHurx1Y2mbkcAAAAASUVORK5CYII=",
      "text/plain": [
       "Plot with title \"Series  redeem_del_ts\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "acf(redeem_del_ts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\tAugmented Dickey-Fuller Test\n",
       "\n",
       "data:  redeem_del_ts\n",
       "Dickey-Fuller = -3.0508, Lag order = 4, p-value = 0.14\n",
       "alternative hypothesis: stationary\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "adf.test(redeem_del_ts)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAMFBMVEUAAABNTU1oaGh8fHyM\njIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////QFLu4AAAACXBIWXMAABJ0AAAS\ndAHeZh94AAAgAElEQVR4nO2dh3ajMBAAhe1zHMfB//+3F3eKBBLsCp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zDgR+DSAACIBKAAIgE\nIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAAC\nIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAi\nAQiASAACIFIOmA4l3AK8QJiUHECk5GFSsgGBUobJyQZEShkmJxteIt1+//37Ms3X9Xo05nE3\n89PONCXcHTxXECkb+iJ93T4vnfe3nzeTDvfPT/tNG1g1iJQNfZH27fX0/Nlcr+fbVrs3522b\nWDGIlA19kX7uW7/PxwfT/m215rBh++oGkbJh8Bnp2v35OTgO28DIZwMipQwjnw3TIm3XLrjB\nBGTDlEgHDjNsDCJlw5RI36a5XK8nDjZsBiJlw5RI1/sJJdP8bta62kGkbJgU6XZlg/mHR5uB\nSAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgE\nIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAACIBKAAIgEIAAiAQiASAAC\nIBKAAIgEIMB/qrRMNocjRAQAAAAASUVORK5CYII=",
      "text/plain": [
       "plot without title"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot(diff(redeem_del_ts))##差分后的时序图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAZpUlEQVR4nO3d60KySgCG0dl4LFO7/6vdalmeMj99GcDW+lGmyUDypBys\n8g48rHQ9A/AMhAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJ\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gbxPS0O1OclhPyqzrGfnbhDR0\nn6fdNV3Pxx8npMF7GZcy8nzUMSFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQ\nEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQ8D/XHAeOeTb8xwAA\nAABJRU5ErkJggg==",
      "text/plain": [
       "Plot with title \"Series  diff(redeem_del_ts)\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "acf(diff(redeem_del_ts))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\tAugmented Dickey-Fuller Test\n",
       "\n",
       "data:  diff(redeem_del_ts)\n",
       "Dickey-Fuller = -7.1293, Lag order = 4, p-value = 0.01\n",
       "alternative hypothesis: stationary\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "adf.test(diff(redeem_del_ts))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.004738446\n",
      "[1] 0.0605687\n",
      "[1] 0.003849948\n",
      "[1] 0.04976641\n"
     ]
    }
   ],
   "source": [
    "for(i in 1:2){print(Box.test(diff(redeem_del_ts),type = \"Box-Pierce\",\n",
    "                             lag = i*6)$p.value)}\n",
    "\n",
    "for(i in 1:2){print(Box.test(diff(redeem_del_ts),type = \"Ljung-Box\",\n",
    "                             lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAA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Db8UdaQvj4mu0wms6+OQwiJMuV8\ni9Do6CGnt1/sg1fIGNIsNf8Wu1vLedPbm1bhFTKG1KTFz+1Fb79GAa+Q/feRrn3y/BBCokwe\nkSBA3udI8+XuludIvJucl7/HR1ftRqt7awqJgcn7OtJs9zpSM/nwOhLvpZx3Njw1hJAok5Ag\nwCtCun/p++4QQqJMQoIAQoIAQoIAQoIAQoIALn9DACFBACFBACFBACFBACFBACFBACFBACFB\nACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFB\nACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFBACFB\nACFBACFBgIGFBGUSEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQEgQQ\nEgQQEgQQEgQQEgQQEgQQEgQQEgQoNCQYmA5neXw4r/WaA3rJqBUdavnnafE72FZF81zRoZZ/\nnha/g21VNM8VHWr552nxO9hWRfNc0aGWf54Wv4NtVTTPFR1q+edp8TvYVkXzXNGhln+eFr+D\nbVU0zxUdavnnafE72FZF81zRoZZ/nha/g21VNM8VHWr552nxO9hWRfNc0aGWf54Wv4NtVTTP\nFR1q+edp8TvYVkXzXNGhln+eFr+DMARCggBCggBCggBCggBCggBCggBCggBCggBCggBCggBC\nggBCggBCggBCggBCggDvEdKsSc1s9ft55z+F3tLn6RDnu5Fj0DyH+jk6O7Ish3o+aq5p7aLM\nvWppvLt/Rz+fLzLd44vTIc53I8egeQ51thuj+T2nsxzq+ai5prWTMveqna/ULNaLJn0dvrBI\nkxzjboY8vvsudiPHoFkOdZGmq+0j4fTwhSyHejFqpmnt5h1CmqX55r//0sfhC5+/N3v0mcYn\n5/TFbuQYNMuhTvYj/g6c5VAvRs0zrR29Q0iTtFyf/P/qM31mGDbN1ifn9MVu5Bg0z6F+j/0z\ncJZDvRg157G29g4hpfP/dU3SfLp5mtrzsIv16Tl9sRs5Bs1zqDurND7czHKoF6NmPNb23jSk\nnfHN7wge+cZu5Bg026FuHxDmZ7uQI6SjUTMea3tvGVJK/zb/K5v1/5PA60PKdqjrZfP7g1y+\nkE5HzXWsHbxlSHur3q9EFxDSXoZDXTVHjwTZQjoZ9ftL/R9rF+8QUnNjWvuf55MRbu1Gr4Pe\n+Vqs8fHpm+tQT0f9VuYLSUXuVEv7a0jLi2tImUO6tRu9Dnrna5GWo/Hy6NNMh3o26jch9eVj\n93x0nn6u5zRp+2p4/6f06Zxe7EaOQfMc6vzsGX6eQz0fNdu0dvEOIV28zj7bzvBq9nu9py8v\neGfD2aBZDnV5fqUsy6FejJptWrt4h5DWo9/LoruzbNXsvtD/Kw6Hc3r/cZTn6uzJoFkOdZp+\n3+WW71AvRs02rV28RUir3XuRdzf387z9wijDVdLTkI52I++gfR9quggpx6FeHzXHtHbxFiHB\nqwkJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJ\nAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAggJAghpQMr897zZMjUD\nIqRymZoBEVK5TM2ACKlcpmZAjkKaT9LPPys+a9JMZC/m7h+Q31g+0s6upPH21lRIr+XuH5Df\nWFL6t17/230+T81ivWiE9Fru/gE5j2X3+STN19uczORLufsH5DiW5fxjvPv8+4tCei13/4Ac\nxTLeP0laC6kQ7v4B+Y1lmkaf86WQyuHuH5Djiw2b/yw9RyqHu39AjkP6Wi/GrtqVw90/ICkd\nnhnNvm99rX+eLpnJl3L3D8hvSJsnSWn8NU+T7Zdnzea2kF7L3f8m0vjVe1A3IQ3d7k0Oq0ma\nvXpH6iakoft+213z6v2onJAG73Oc0sjj0YsJCQIICQIICQIICQIICQIICQIICQIICQIICQII\nCQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQIICQL8\nD/VF2hYPqt51AAAAAElFTkSuQmCC",
      "text/plain": [
       "Plot with title \"Series  diff(redeem_del_ts)\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pacf(diff(redeem_del_ts))#拖尾"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAAM1BMVEUAAAAAAP9NTU1oaGh8\nfHyMjIyampqnp6eysrK9vb3Hx8fQ0NDZ2dnh4eHp6enw8PD////UNI3wAAAACXBIWXMAABJ0\nAAASdAHeZh94AAAZpUlEQVR4nO3d60KySgCG0dl4LFO7/6vdalmeMj99GcDW+lGmyUDypBys\n8g48rHQ9A/AMhAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJ\nAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEdJPFtCll\nNFte+55S7vphft5tf+/5ZqDpwedlKZNbp5FwaVKXJz89u2ZSytWf0DMT0i1m5dP8yjdFQppv\nR5l+f75t5ewgpLfm/Lqbon9SQrrBS/ny9vN3RUIafXaz/7xZN0c3TyPh1pAuDjn6u09JQrrB\nZv2Yrd/fV+M2fuMer5H7r/afN8+Fr/86jeDs/Nt176+bH1RqRgZGSDfYrzTrrwuzpjSz1f7G\n1Wi7/ly6cT3fxFcmF1tYbba7Ri8nz0inITXfX3+McjT5k2kc33Yyk+8vozLaPKG+NGV86Xn1\nyqTOo/l8fj5bwlKaaz/IJyakG2yekSaH696qOXidt/m8uX38tbod3ri/vL351NvnLYcF7dfP\nr/X0bf8c+DXK0dgn0zi67XQmx7uvVrMfXqFem9SVkE6WcHL1xe8zE9INdttIzfT181f9+37l\n2f32/bj4+rW6Hd443d2w3qydL2cT3X/f1ZBe9vf8GuVo7JNpXLztYCa3X318On+Fem1SV0I6\nWcKXS0v6JwjpFpPPFWe02H61WVvG6/f1xzq0+2W/fn/fr25HN26fAt53LwnP9hhsNieazdQW\nTbn20u5rn91+lKPJn0z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J\nAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAh\nQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIENKA9O9/ebPnoRkQIfWXh2ZAhNRf\nHpoBEVJ/eWgG5CCkxaR8/TPxWVNmIuuYH/+AfMcyLzu7ksbbS1MhdcuPf0C+Yynl9f39dff1\nojTL92UjpG758Q/IaSy7rydl8b7NySPZKT/+ATmMZbWYj3dff14ppG758Q/IQSzjj42kdyH1\nhB//gHzHMi2jl8VKSP3hxz8ghzsbNh9WtpH6w49/QA5Dentfju216w8//gEpZb9lNPu89Pb+\ntbnkkeyUH/+AfIe02Ugq47dFmWyvnjWby0Lqlh//kyjjrufgbxPS0O1OclhPyqzrGfnbhDR0\nn6fdNV3Pxx8npMF7GZcy8nzUMSFBgJAgQEgQICQIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQ\nEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQ8D/XHAeOeTb8xwAA\nAABJRU5ErkJggg==",
      "text/plain": [
       "Plot with title \"Series  diff(redeem_del_ts)\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "acf(diff(redeem_del_ts)) #截尾"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "redeem_del_fit = arima(redeem_del_ts,order = c(0,1,1))####建模"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.7397571\n",
      "[1] 0.9739962\n",
      "[1] 0.7547025\n",
      "[1] 0.9783781\n"
     ]
    }
   ],
   "source": [
    "###模型显著性检验====\n",
    "for(i in 1:2){print(Box.test(redeem_del_fit$residuals,\n",
    "                             type = \"Ljung-Box\",lag = i*6)$p.value)}\n",
    "\n",
    "\n",
    "for(i in 1:2){print(Box.test(redeem_del_fit$residuals,\n",
    "                             type = 'Box-Pierce',lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "redeem_pred_test = predict(redeem_del_fit,n.ahead = 31)$pred+\n",
    "  forecast(redeem_stl_res$time.series[,1],h=31)$mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "191.230702400082"
      ],
      "text/latex": [
       "191.230702400082"
      ],
      "text/markdown": [
       "191.230702400082"
      ],
      "text/plain": [
       "[1] 191.2307"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "get_score(purchase_pred_test,redeem_pred_test,test_data$total_purchase_amt,\n",
    "          test_data$total_redeem_amt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " ARIMA(2,0,2)           with non-zero mean : 3036.781\n",
      " ARIMA(0,0,0)           with non-zero mean : 3044.866\n",
      " ARIMA(1,0,0)           with non-zero mean : 3030.344\n",
      " ARIMA(0,0,1)           with non-zero mean : 3032.692\n",
      " ARIMA(0,0,0)           with zero mean     : 3429.418\n",
      " ARIMA(2,0,0)           with non-zero mean : 3032.426\n",
      " ARIMA(1,0,1)           with non-zero mean : 3032.428\n",
      " ARIMA(2,0,1)           with non-zero mean : 3034.588\n",
      " ARIMA(1,0,0)           with zero mean     : 3074.01\n",
      "\n",
      " Best model: ARIMA(1,0,0)           with non-zero mean \n",
      "\n"
     ]
    }
   ],
   "source": [
    "#####去除周期后 auto.arima\n",
    "#####purchase======\n",
    "autoFit = auto.arima(purchase_del_ts/1000,d=0,seasonal = F,trace = T )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.9697502\n",
      "[1] 0.9881997\n",
      "[1] 0.9739763\n",
      "[1] 0.9917919\n"
     ]
    }
   ],
   "source": [
    "for(i in 1:2){print(Box.test(autoFit$residuals,type = \"Ljung-Box\",lag = i*6)$p.value)}\n",
    "for(i in 1:2){print(Box.test(autoFit$residuals,type = 'Box-Pierce',lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "purchase_pred_test = forecast(purchase_stl_res$time.series[,1],31)$mean+\n",
    "  forecast(autoFit,h=31)$mean*1000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " ARIMA(2,1,2)           with drift         : 4746.025\n",
      " ARIMA(0,1,0)           with drift         : 4781.675\n",
      " ARIMA(1,1,0)           with drift         : 4766.45\n",
      " ARIMA(0,1,1)           with drift         : 4742.536\n",
      " ARIMA(0,1,0)                              : 4779.628\n",
      " ARIMA(1,1,1)           with drift         : 4741.796\n",
      " ARIMA(2,1,1)           with drift         : 4743.756\n",
      " ARIMA(1,1,2)           with drift         : 4743.779\n",
      " ARIMA(0,1,2)           with drift         : 4741.605\n",
      " ARIMA(0,1,3)           with drift         : 4743.777\n",
      " ARIMA(1,1,3)           with drift         : 4745.991\n",
      " ARIMA(0,1,2)                              : 4739.482\n",
      " ARIMA(0,1,1)                              : 4740.435\n",
      " ARIMA(1,1,2)                              : 4741.617\n",
      " ARIMA(0,1,3)                              : 4741.616\n",
      " ARIMA(1,1,1)                              : 4739.681\n",
      " ARIMA(1,1,3)                              : 4743.793\n",
      "\n",
      " Best model: ARIMA(0,1,2)                              \n",
      "\n"
     ]
    }
   ],
   "source": [
    "autoFit = auto.arima(redeem_del_ts,d=1,seasonal = F,trace = TRUE)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] 0.9896333\n",
      "[1] 0.9995391\n",
      "[1] 0.9910407\n",
      "[1] 0.9996895\n"
     ]
    }
   ],
   "source": [
    "###模型显著性检验====\n",
    "for(i in 1:2){print(Box.test(autoFit$residuals,type = \"Ljung-Box\",lag = i*6)$p.value)}\n",
    "for(i in 1:2){print(Box.test(autoFit$residuals,type = 'Box-Pierce',lag = i*6)$p.value)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "redeem_pred_test = forecast(autoFit,h=31)$mean+\n",
    "  forecast(redeem_stl_res$time.series[,1],h=31)$mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "190.495719132032"
      ],
      "text/latex": [
       "190.495719132032"
      ],
      "text/markdown": [
       "190.495719132032"
      ],
      "text/plain": [
       "[1] 190.4957"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "get_score(purchase_pred_test,redeem_pred_test,test_data$total_purchase_amt,\n",
    "          test_data$total_redeem_amt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Disabling yearly seasonality. Run prophet with yearly.seasonality=TRUE to override this.\n",
      "Disabling daily seasonality. Run prophet with daily.seasonality=TRUE to override this.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A data.frame: 123 × 2</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>ds</th><th scope=col>y</th></tr>\n",
       "\t<tr><th scope=col>&lt;date&gt;</th><th scope=col>&lt;int&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>2014-03-31</td><td>423852634</td></tr>\n",
       "\t<tr><td>2014-04-01</td><td>277429358</td></tr>\n",
       "\t<tr><td>2014-04-02</td><td>272612066</td></tr>\n",
       "\t<tr><td>2014-04-03</td><td>266605457</td></tr>\n",
       "\t<tr><td>2014-04-04</td><td>200192637</td></tr>\n",
       "\t<tr><td>2014-04-05</td><td>163199682</td></tr>\n",
       "\t<tr><td>2014-04-06</td><td>139576683</td></tr>\n",
       "\t<tr><td>2014-04-07</td><td>176966561</td></tr>\n",
       "\t<tr><td>2014-04-08</td><td>250015131</td></tr>\n",
       "\t<tr><td>2014-04-09</td><td>289330278</td></tr>\n",
       "\t<tr><td>2014-04-10</td><td>286914864</td></tr>\n",
       "\t<tr><td>2014-04-11</td><td>277077434</td></tr>\n",
       "\t<tr><td>2014-04-12</td><td>123295320</td></tr>\n",
       "\t<tr><td>2014-04-13</td><td>178934722</td></tr>\n",
       "\t<tr><td>2014-04-14</td><td>415986984</td></tr>\n",
       "\t<tr><td>2014-04-15</td><td>285293076</td></tr>\n",
       "\t<tr><td>2014-04-16</td><td>255914640</td></tr>\n",
       "\t<tr><td>2014-04-17</td><td>265341592</td></tr>\n",
       "\t<tr><td>2014-04-18</td><td>225952909</td></tr>\n",
       "\t<tr><td>2014-04-19</td><td>146374940</td></tr>\n",
       "\t<tr><td>2014-04-20</td><td>161057781</td></tr>\n",
       "\t<tr><td>2014-04-21</td><td>295635256</td></tr>\n",
       "\t<tr><td>2014-04-22</td><td>268810141</td></tr>\n",
       "\t<tr><td>2014-04-23</td><td>278470936</td></tr>\n",
       "\t<tr><td>2014-04-24</td><td>224536754</td></tr>\n",
       "\t<tr><td>2014-04-25</td><td>227764292</td></tr>\n",
       "\t<tr><td>2014-04-26</td><td>158122962</td></tr>\n",
       "\t<tr><td>2014-04-27</td><td>191915377</td></tr>\n",
       "\t<tr><td>2014-04-28</td><td>327724735</td></tr>\n",
       "\t<tr><td>2014-04-29</td><td>307578349</td></tr>\n",
       "\t<tr><td>...</td><td>...</td></tr>\n",
       "\t<tr><td>2014-07-02</td><td>328950951</td></tr>\n",
       "\t<tr><td>2014-07-03</td><td>289009780</td></tr>\n",
       "\t<tr><td>2014-07-04</td><td>264494550</td></tr>\n",
       "\t<tr><td>2014-07-05</td><td>272535138</td></tr>\n",
       "\t<tr><td>2014-07-06</td><td>195530758</td></tr>\n",
       "\t<tr><td>2014-07-07</td><td>317612569</td></tr>\n",
       "\t<tr><td>2014-07-08</td><td>340453063</td></tr>\n",
       "\t<tr><td>2014-07-09</td><td>269642881</td></tr>\n",
       "\t<tr><td>2014-07-10</td><td>326009240</td></tr>\n",
       "\t<tr><td>2014-07-11</td><td>240050748</td></tr>\n",
       "\t<tr><td>2014-07-12</td><td>149081488</td></tr>\n",
       "\t<tr><td>2014-07-13</td><td>199459990</td></tr>\n",
       "\t<tr><td>2014-07-14</td><td>284753279</td></tr>\n",
       "\t<tr><td>2014-07-15</td><td>261722182</td></tr>\n",
       "\t<tr><td>2014-07-16</td><td>234775948</td></tr>\n",
       "\t<tr><td>2014-07-17</td><td>298279385</td></tr>\n",
       "\t<tr><td>2014-07-18</td><td>208671287</td></tr>\n",
       "\t<tr><td>2014-07-19</td><td>155464283</td></tr>\n",
       "\t<tr><td>2014-07-20</td><td>174462836</td></tr>\n",
       "\t<tr><td>2014-07-21</td><td>434191479</td></tr>\n",
       "\t<tr><td>2014-07-22</td><td>369043423</td></tr>\n",
       "\t<tr><td>2014-07-23</td><td>308353077</td></tr>\n",
       "\t<tr><td>2014-07-24</td><td>347622431</td></tr>\n",
       "\t<tr><td>2014-07-25</td><td>262874791</td></tr>\n",
       "\t<tr><td>2014-07-26</td><td>282653341</td></tr>\n",
       "\t<tr><td>2014-07-27</td><td>166610652</td></tr>\n",
       "\t<tr><td>2014-07-28</td><td>345986909</td></tr>\n",
       "\t<tr><td>2014-07-29</td><td>303480103</td></tr>\n",
       "\t<tr><td>2014-07-30</td><td>250117716</td></tr>\n",
       "\t<tr><td>2014-07-31</td><td>277194379</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A data.frame: 123 × 2\n",
       "\\begin{tabular}{r|ll}\n",
       " ds & y\\\\\n",
       " <date> & <int>\\\\\n",
       "\\hline\n",
       "\t 2014-03-31 & 423852634\\\\\n",
       "\t 2014-04-01 & 277429358\\\\\n",
       "\t 2014-04-02 & 272612066\\\\\n",
       "\t 2014-04-03 & 266605457\\\\\n",
       "\t 2014-04-04 & 200192637\\\\\n",
       "\t 2014-04-05 & 163199682\\\\\n",
       "\t 2014-04-06 & 139576683\\\\\n",
       "\t 2014-04-07 & 176966561\\\\\n",
       "\t 2014-04-08 & 250015131\\\\\n",
       "\t 2014-04-09 & 289330278\\\\\n",
       "\t 2014-04-10 & 286914864\\\\\n",
       "\t 2014-04-11 & 277077434\\\\\n",
       "\t 2014-04-12 & 123295320\\\\\n",
       "\t 2014-04-13 & 178934722\\\\\n",
       "\t 2014-04-14 & 415986984\\\\\n",
       "\t 2014-04-15 & 285293076\\\\\n",
       "\t 2014-04-16 & 255914640\\\\\n",
       "\t 2014-04-17 & 265341592\\\\\n",
       "\t 2014-04-18 & 225952909\\\\\n",
       "\t 2014-04-19 & 146374940\\\\\n",
       "\t 2014-04-20 & 161057781\\\\\n",
       "\t 2014-04-21 & 295635256\\\\\n",
       "\t 2014-04-22 & 268810141\\\\\n",
       "\t 2014-04-23 & 278470936\\\\\n",
       "\t 2014-04-24 & 224536754\\\\\n",
       "\t 2014-04-25 & 227764292\\\\\n",
       "\t 2014-04-26 & 158122962\\\\\n",
       "\t 2014-04-27 & 191915377\\\\\n",
       "\t 2014-04-28 & 327724735\\\\\n",
       "\t 2014-04-29 & 307578349\\\\\n",
       "\t ... & ...\\\\\n",
       "\t 2014-07-02 & 328950951\\\\\n",
       "\t 2014-07-03 & 289009780\\\\\n",
       "\t 2014-07-04 & 264494550\\\\\n",
       "\t 2014-07-05 & 272535138\\\\\n",
       "\t 2014-07-06 & 195530758\\\\\n",
       "\t 2014-07-07 & 317612569\\\\\n",
       "\t 2014-07-08 & 340453063\\\\\n",
       "\t 2014-07-09 & 269642881\\\\\n",
       "\t 2014-07-10 & 326009240\\\\\n",
       "\t 2014-07-11 & 240050748\\\\\n",
       "\t 2014-07-12 & 149081488\\\\\n",
       "\t 2014-07-13 & 199459990\\\\\n",
       "\t 2014-07-14 & 284753279\\\\\n",
       "\t 2014-07-15 & 261722182\\\\\n",
       "\t 2014-07-16 & 234775948\\\\\n",
       "\t 2014-07-17 & 298279385\\\\\n",
       "\t 2014-07-18 & 208671287\\\\\n",
       "\t 2014-07-19 & 155464283\\\\\n",
       "\t 2014-07-20 & 174462836\\\\\n",
       "\t 2014-07-21 & 434191479\\\\\n",
       "\t 2014-07-22 & 369043423\\\\\n",
       "\t 2014-07-23 & 308353077\\\\\n",
       "\t 2014-07-24 & 347622431\\\\\n",
       "\t 2014-07-25 & 262874791\\\\\n",
       "\t 2014-07-26 & 282653341\\\\\n",
       "\t 2014-07-27 & 166610652\\\\\n",
       "\t 2014-07-28 & 345986909\\\\\n",
       "\t 2014-07-29 & 303480103\\\\\n",
       "\t 2014-07-30 & 250117716\\\\\n",
       "\t 2014-07-31 & 277194379\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A data.frame: 123 × 2\n",
       "\n",
       "| ds &lt;date&gt; | y &lt;int&gt; |\n",
       "|---|---|\n",
       "| 2014-03-31 | 423852634 |\n",
       "| 2014-04-01 | 277429358 |\n",
       "| 2014-04-02 | 272612066 |\n",
       "| 2014-04-03 | 266605457 |\n",
       "| 2014-04-04 | 200192637 |\n",
       "| 2014-04-05 | 163199682 |\n",
       "| 2014-04-06 | 139576683 |\n",
       "| 2014-04-07 | 176966561 |\n",
       "| 2014-04-08 | 250015131 |\n",
       "| 2014-04-09 | 289330278 |\n",
       "| 2014-04-10 | 286914864 |\n",
       "| 2014-04-11 | 277077434 |\n",
       "| 2014-04-12 | 123295320 |\n",
       "| 2014-04-13 | 178934722 |\n",
       "| 2014-04-14 | 415986984 |\n",
       "| 2014-04-15 | 285293076 |\n",
       "| 2014-04-16 | 255914640 |\n",
       "| 2014-04-17 | 265341592 |\n",
       "| 2014-04-18 | 225952909 |\n",
       "| 2014-04-19 | 146374940 |\n",
       "| 2014-04-20 | 161057781 |\n",
       "| 2014-04-21 | 295635256 |\n",
       "| 2014-04-22 | 268810141 |\n",
       "| 2014-04-23 | 278470936 |\n",
       "| 2014-04-24 | 224536754 |\n",
       "| 2014-04-25 | 227764292 |\n",
       "| 2014-04-26 | 158122962 |\n",
       "| 2014-04-27 | 191915377 |\n",
       "| 2014-04-28 | 327724735 |\n",
       "| 2014-04-29 | 307578349 |\n",
       "| ... | ... |\n",
       "| 2014-07-02 | 328950951 |\n",
       "| 2014-07-03 | 289009780 |\n",
       "| 2014-07-04 | 264494550 |\n",
       "| 2014-07-05 | 272535138 |\n",
       "| 2014-07-06 | 195530758 |\n",
       "| 2014-07-07 | 317612569 |\n",
       "| 2014-07-08 | 340453063 |\n",
       "| 2014-07-09 | 269642881 |\n",
       "| 2014-07-10 | 326009240 |\n",
       "| 2014-07-11 | 240050748 |\n",
       "| 2014-07-12 | 149081488 |\n",
       "| 2014-07-13 | 199459990 |\n",
       "| 2014-07-14 | 284753279 |\n",
       "| 2014-07-15 | 261722182 |\n",
       "| 2014-07-16 | 234775948 |\n",
       "| 2014-07-17 | 298279385 |\n",
       "| 2014-07-18 | 208671287 |\n",
       "| 2014-07-19 | 155464283 |\n",
       "| 2014-07-20 | 174462836 |\n",
       "| 2014-07-21 | 434191479 |\n",
       "| 2014-07-22 | 369043423 |\n",
       "| 2014-07-23 | 308353077 |\n",
       "| 2014-07-24 | 347622431 |\n",
       "| 2014-07-25 | 262874791 |\n",
       "| 2014-07-26 | 282653341 |\n",
       "| 2014-07-27 | 166610652 |\n",
       "| 2014-07-28 | 345986909 |\n",
       "| 2014-07-29 | 303480103 |\n",
       "| 2014-07-30 | 250117716 |\n",
       "| 2014-07-31 | 277194379 |\n",
       "\n"
      ],
      "text/plain": [
       "    ds         y        \n",
       "1   2014-03-31 423852634\n",
       "2   2014-04-01 277429358\n",
       "3   2014-04-02 272612066\n",
       "4   2014-04-03 266605457\n",
       "5   2014-04-04 200192637\n",
       "6   2014-04-05 163199682\n",
       "7   2014-04-06 139576683\n",
       "8   2014-04-07 176966561\n",
       "9   2014-04-08 250015131\n",
       "10  2014-04-09 289330278\n",
       "11  2014-04-10 286914864\n",
       "12  2014-04-11 277077434\n",
       "13  2014-04-12 123295320\n",
       "14  2014-04-13 178934722\n",
       "15  2014-04-14 415986984\n",
       "16  2014-04-15 285293076\n",
       "17  2014-04-16 255914640\n",
       "18  2014-04-17 265341592\n",
       "19  2014-04-18 225952909\n",
       "20  2014-04-19 146374940\n",
       "21  2014-04-20 161057781\n",
       "22  2014-04-21 295635256\n",
       "23  2014-04-22 268810141\n",
       "24  2014-04-23 278470936\n",
       "25  2014-04-24 224536754\n",
       "26  2014-04-25 227764292\n",
       "27  2014-04-26 158122962\n",
       "28  2014-04-27 191915377\n",
       "29  2014-04-28 327724735\n",
       "30  2014-04-29 307578349\n",
       "... ...        ...      \n",
       "94  2014-07-02 328950951\n",
       "95  2014-07-03 289009780\n",
       "96  2014-07-04 264494550\n",
       "97  2014-07-05 272535138\n",
       "98  2014-07-06 195530758\n",
       "99  2014-07-07 317612569\n",
       "100 2014-07-08 340453063\n",
       "101 2014-07-09 269642881\n",
       "102 2014-07-10 326009240\n",
       "103 2014-07-11 240050748\n",
       "104 2014-07-12 149081488\n",
       "105 2014-07-13 199459990\n",
       "106 2014-07-14 284753279\n",
       "107 2014-07-15 261722182\n",
       "108 2014-07-16 234775948\n",
       "109 2014-07-17 298279385\n",
       "110 2014-07-18 208671287\n",
       "111 2014-07-19 155464283\n",
       "112 2014-07-20 174462836\n",
       "113 2014-07-21 434191479\n",
       "114 2014-07-22 369043423\n",
       "115 2014-07-23 308353077\n",
       "116 2014-07-24 347622431\n",
       "117 2014-07-25 262874791\n",
       "118 2014-07-26 282653341\n",
       "119 2014-07-27 166610652\n",
       "120 2014-07-28 345986909\n",
       "121 2014-07-29 303480103\n",
       "122 2014-07-30 250117716\n",
       "123 2014-07-31 277194379"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Disabling yearly seasonality. Run prophet with yearly.seasonality=TRUE to override this.\n",
      "Disabling daily seasonality. Run prophet with daily.seasonality=TRUE to override this.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "161.851032682629"
      ],
      "text/latex": [
       "161.851032682629"
      ],
      "text/markdown": [
       "161.851032682629"
      ],
      "text/plain": [
       "[1] 161.851"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "holidays_and_effect_days <- data_frame(\n",
    "  holiday = 'holidays_and_effect_days',\n",
    "  ds = as.Date(c('2014-04-03', '2014-04-04', \n",
    "                 '2014-04-05', '2014-04-06', '2014-04-07', \n",
    "                 '2014-04-08', '2014-04-09',\n",
    "                 \n",
    "                 '2014-04-29', '2014-04-30', \n",
    "                 '2014-05-01', '2014-05-02', '2014-05-03',\n",
    "                 '2014-05-04', '2014-05-05',\n",
    "                 \n",
    "                 '2014-05-29', '2014-05-30',\n",
    "                 '2014-05-31', '2014-06-01', '2014-06-02', \n",
    "                 '2014-06-03', '2014-06-04')),\n",
    "  lower_window = 0,\n",
    "  upper_window = 0\n",
    ")\n",
    "\n",
    "holidays <- data_frame(\n",
    "  holiday = 'true_holidays',\n",
    "  ds = as.Date(c('2014-04-05', '2014-04-06', '2014-04-07',\n",
    "                 '2014-05-01', '2014-05-02', '2014-05-03',\n",
    "                 '2014-05-31', '2014-06-01', '2014-06-02')),\n",
    "  lower_window = 0,\n",
    "  upper_window = 0\n",
    ")\n",
    "holidays <- bind_rows(holidays_and_effect_days, holidays)\n",
    "\n",
    "\n",
    "\n",
    "###purchase=========\n",
    "\n",
    "Myprophet_purchase = prophet::prophet(changepoint_prior_scale=0.5,weekly_seasonality=T,\n",
    "                                      holidays= holidays)\n",
    "df_purchase = data.frame(train_data$report_date ,train_data$total_purchase_amt )\n",
    "colnames(df_purchase) <-c('ds','y')\n",
    "Myprophet_purchase = prophet::fit.prophet(Myprophet_purchase,df_purchase)\n",
    "\n",
    "future_purchase = prophet::make_future_dataframe(Myprophet_purchase,periods=31,\n",
    "                                                 include_history=F)\n",
    "forecast_purchase = predict(Myprophet_purchase, future_purchase)\n",
    "purchase_pred_test = forecast_purchase$yhat\n",
    "\n",
    "\n",
    "\n",
    "###redeem=====\n",
    "Myprophet_redeem = prophet::prophet(changepoint_prior_scale=0.5,weekly_seasonality=True,\n",
    "                                    holidays= holidays)\n",
    "df_redeem = data.frame(train_data$report_date ,train_data$total_redeem_amt )\n",
    "colnames(df_redeem) <-c('ds','y')\n",
    "df_redeem\n",
    "Myprophet_redeem = prophet::fit.prophet(Myprophet_redeem,df_redeem)\n",
    "\n",
    "future_redeem = prophet::make_future_dataframe(Myprophet_redeem,periods=31,\n",
    "                                               include_history=F)\n",
    "forecast_redeem = predict(Myprophet_redeem, future_redeem)\n",
    "redeem_pred_test = forecast_redeem$yhat\n",
    "\n",
    "get_score(purchase_pred_test,redeem_pred_test,test_data$total_purchase_amt,\n",
    "          test_data$total_redeem_amt)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "R",
   "language": "R",
   "name": "ir"
  },
  "language_info": {
   "codemirror_mode": "r",
   "file_extension": ".r",
   "mimetype": "text/x-r-source",
   "name": "R",
   "pygments_lexer": "r",
   "version": "3.5.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
